var fs = require('fs');
var path =require('path');

var subDir = process.argv[2];
var filter = process.argv[3];

fs.readdir("D:\\16002090120_node\\b",function(err,list){
    if(err){
        console.log(err);
    }else{
        console.log(list);
        for(var item of list){
           if(path.extname(item) === '.' + filter){
               console.log(item);
           }
        }
    }
});